package stocks.server;

import java.util.ArrayList;

/**
 * Methods a client can invoke on the server.
 * @author Brendan
 *
 */
public interface StockServerInterface extends java.rmi.Remote {
	/**
	 * Push a request to buy a stock
	 */
    public int requestBuy(CallBack c, String tag, int price, int quantity) throws java.rmi.RemoteException;
    /**
     * Push a request to sell a stock
     */
    public void requestSell(CallBack c, String tag, int price, int quantity) throws java.rmi.RemoteException;
    /**
     * Return transactions
     */
    public ArrayList<String> requestTransactions(CallBack c, String startDate, String endDate) throws java.rmi.RemoteException;
    /**
     * Authenticate user
     */
    public void login(String username, String password) throws java.rmi.RemoteException;
    /**
     * Register user
     */
    public void register(String username, String password) throws java.rmi.RemoteException;
    /**
     * Perform initial setup
     */
    public void registerClient(CallBack client) throws java.rmi.RemoteException;
    /**
     * Get all stock prices in Array form for client
     */
    public ArrayList<String> getStockPrices(CallBack client) throws java.rmi.RemoteException;
}